//
//  LoginView.m
//  UI16.真.豆瓣
//
//  Created by dllo on 15/10/31.
//  Copyright © 2015年 Amydom. All rights reserved.
//

#import "LoginView.h"

@implementation LoginView

-(void)dealloc{
    [_ButtonZC release];
    [_ButtonDL release];
    [_MField release];
    [_UserField release];
    [_MLabel release];
    [_UserLabel release];
    [super dealloc];
    
    
}
-(instancetype)initWithFrame:(CGRect)frame{
    
    if (self = [super initWithFrame:frame]) {
        [self CreatSubView];
        
    }
    return  self;
    
}

- (void)CreatSubView{
    
    
    self.UserLabel = [[UILabel alloc]initWithFrame:CGRectMake(50, 40, 80, 30)];
    self.UserLabel.text = @"用户名:";
    [self addSubview:self.UserLabel];
    [_UserLabel release];
    
    self.MLabel = [[UILabel alloc]initWithFrame:CGRectMake(50, 110, 80, 30)];
    self.MLabel.text = @"密码:";
    [self addSubview:self.MLabel];
    [_MLabel release];
    
    
    self.UserField =[[UITextField alloc]initWithFrame:CGRectMake(160, 40, 150, 30)];
    self.UserField.placeholder = @"请输入用户名";
    self.UserField.borderStyle = UITextBorderStyleRoundedRect;
    [self addSubview:self.UserField];
    [_UserField release];
    
    self.MField = [[UITextField alloc]initWithFrame:CGRectMake(160, 110, 150, 30)];
    self.MField.placeholder = @"请输入密码";
    self.MField.borderStyle = UITextBorderStyleRoundedRect;
    [self addSubview:self.MField];
    [_MField release];
    
    
    self.ButtonDL =[UIButton buttonWithType:UIButtonTypeCustom];
    self.ButtonDL.frame = CGRectMake(50, 170, 120, 50);
    [self.ButtonDL setImage:[UIImage imageNamed:@"login.png"] forState:UIControlStateNormal];
    [self addSubview:self.ButtonDL];
//    [_ButtonDL release];
    
    self.ButtonZC = [UIButton buttonWithType:UIButtonTypeCustom];
    self.ButtonZC.frame = CGRectMake(200, 170, 120, 50);
    [self.ButtonZC setImage:[UIImage imageNamed:@"register.png"] forState:UIControlStateNormal];
    [self addSubview:self.ButtonZC];
//    [_ButtonZC release];
    
    
    
    
    
    
    
}


//- (void)setMyUser:(UserModel *)myUser{
//    
//    if (_myUser != myUser) {
//        [_myUser release];
//        _myUser = [myUser retain];
//    }
//    self.nameStr = self.myUser.UserName;
//    self.passWordStr = self.myUser.passWord;
//    
//    
//}


@end
